#include <iostream>
#include <complex>

using namespace std;

template <class T>
inline void swapp(T& a, T& b)
{
	T temp = a;
	a = b;
	b = temp;
}

int main(void)
{
	string s1 = "hello";
	string s2 = "world";
	cout << "Input: [" << s1 << ", " << s2 << "]" << endl;
	swapp(s1, s2);
	cout << "Output: [" << s1 << ", " << s2 << "]" << endl;

	int a = 5, b = 10;
	cout << "Input: [" << a << ", " << b << "]" << endl;
	swapp(a, b);
	cout << "Output: [" << a << ", " << b << "]" << endl;

	double d1 = 1.5, d2 = 2.5;
	cout << "Input: [" << d1 << ", " << d2 << "]" << endl;
	swapp(d1, d2);
	cout << "Output: [" << d1 << ", " << d2 << "]" << endl;

	complex<double> c1(1,2), c2(3, 4);
	cout << "Input: [" << c1 << ", " << c2 << "]" << endl;
	swapp(c1, c2);
	cout << "Output: [" << c1 << ", " << c2 << "]" << endl;

	return 0;
}
